package com.zou.service;

import com.zou.mapper.BookMapper;
import com.zou.pojo.Books;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

public class BookServiceImpl implements BookService{

    private BookMapper bookMapper;

    public void setBookMapper(BookMapper bookMapper) {
        this.bookMapper = bookMapper;
    }

    @Override
    public boolean addbook(Books book) {
        return bookMapper.addBook(book);
    }

    @Override
    public boolean deletebook(int bookID) {
        return bookMapper.deleteBook(bookID);
    }

    @Override
    public boolean updatebook(Books book) {
        return bookMapper.updateBook(book);
    }

    @Override
    public List<Books> queryallbook() {
        return bookMapper.queryAllBook();
    }
}
